/*
* jlb
*/
package com.jlb.user.entity;

/**
 * 用户的押金 的实体类的状态
 * 状态：可返还 Returnable，冻结 Frozen，已返还 Returned
 *
 * @author jlb
 */
public enum UserDepositState implements java.io.Serializable {
    Returnable("可返还"),
    Frozen("冻结"),
    Returned("已返还"),;

    public String val;

    UserDepositState(String val) {
        this.val = val;
    }

    /**
     * 根据状态名称查询状态
     *
     * @param stateName
     * @return
     */
    public static UserDepositState getEnum(String stateName) {
        for (UserDepositState userDepositState : UserDepositState.values()) {
            if (userDepositState.name().equalsIgnoreCase(stateName)) {
                return userDepositState;
            }
        }
        return null;
    }

    @Override
    public String toString() {
        return this.name();
    }

}
